#include "..\Engine\Base\MemLeaks.h"
#include "SDL.h"
#include "GameMiner.h"
#include <ctime>
 
int main(int argc, char** argv){
    
	#if defined( _DEBUG )
	MemLeaks::MemoryBegin();
	#endif //defined(_DEBUG)

	srand(uint32(time(0)));

	CGameMiner MyGame;
	MyGame.Init();

	SDL_Event e;
	bool Quit = false;
	while (!Quit)
	{
		while(SDL_PollEvent(&e))
		{
			if (e.type == SDL_QUIT)
			{
				Quit = true;
			}			

			MyGame.ManageEvent(&e);
		}

		MyGame.Update();
		MyGame.Render();
	}

	#if defined( _DEBUG )
	MemLeaks::MemoryEnd();
	#endif //defined(_DEBUG)
 
    return 0;
}